package com.hanamaki.oop.demo13.diyException;

/**
 * 自定义 异常类
 */
public class MyException extends Exception {

    // 传递年龄   1< age >100 抛出异常
    private int age;

    public MyException(int age) {
        this.age = age;
    }


    @Override
    public String toString() {
        return "MyException{" +
                "ageIndexRound=" + age +
                '}';
    }
}
